package com.tbit.uqbike.constant;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.context.annotation.Configuration;

/**
 * 敏感操作密码
 *
 * @author Leon
 * 2017年7月24日 下午3:43:06
 */
@Configuration
@RefreshScope
public class OperaPswConstant {
    /**
     * 管理员密钥
     */
    public static String ADMIN_OPERA_PSW = "QWERTYUIOP";
    /**
     * 取消预约
     */
    public static final String CANCAL_USER_APPOINTMENT = "CANCAL";
    /**
     * 删除代理商操作密码
     */
    public static String ACCOUNT_OPERA_DEL = "ASDFGHJKL";
    /**
     * 各类卡操作密钥，修改订单金额，用户余额礼品卡余额密钥
     */
    public static String USER_OPERA_UPDATE_MONEY = "QWERTYUIOP";
    /**
     * 手动结束订单
     */
    public static String ORDER_FINISH_MANUAL = "QWERTYUIOP";
    /**
     * 人工退还押金,订单号退款
     */
    public static String DEPOSIT_OPERA_UPDATE_MONEY = "ZXCVBNM";
    /**
     * 修改计费规则密码
     */
    public static String USER_OPERA_FEE_RULE = "36987";
    /**
     * 修改系统配置和删除运营区域围栏
     */
    public static String USER_OPERA_SYSTEMCONFIG_EDIT = "74123";
    /**
     * 删除设备
     */
    public static String ACCOUNT_OPERA_DEL_MACHINE = "ASDFGHJKL";
    /**
     * 修改支付宝等配置（payController里面的所有类都使用该密钥），添加退款记录
     */
    public static String ACCOUNT_OPERA_UPDATE_CONFIG = "ASDFGHJKL";
    /**
     * 客户端URL
     */
    public static String ACCOUNT_OPERA_CLIENT_URL = "http://client.uqbike.cn";
    /**
     * 接收推送馈电信息客户端
     */
    public static String ACCOUNT_OPERA_PUSH_URL = "http://clientv2.uqbike.com";
    /**
     * 判断是否使用泰比特寻程短信发送的key
     */
    public static String SMS_SEND_CODE_APPKEY = "5f272cb18fac070fbefb93121afc4916";
    /**
     * 判断是否使用泰比特寻程短信发送标识
     */
    public static String SMS_SEND_CODE_MODELID = "92020";
    /**
     * 超级管理员验证码
     */
    public static String LOGIN_AUTH_PSW = "3698";
    /**
     * 退款信息存放路径
     */
    public static String PATH = "D:/UQBIKE/WbServer60002(manager_new)/download/";
    /**
     * 对账数据存放路径
     */
    public static String EXCEL_PATH = "D:/UQBIKE/WbServer60002(manager_new)/download/excel";
    /**
     * 修改工单设置密码
     */
    public static String WORKORDER_EDIT = "147258";
    /**
     * 修改电池方案密码
     */
    public static String BATTERY_MODEL_EDIT = "753951";
    /**
     * OTA平台ip
     */
    public static String OTA_IP = "http://otav2.tbitgps.com/prod-api";
    /**
     * OTA的key
     */
    public static String OTA_KEY = "E99D2A02426D47F5A0253DF5B0DD490C";
    /**
     * OTA密钥
     */
    public static String OAT_SECRET = "64DD75EA2868337AB3D63E8D4E6E2BAC";
    /**
     * 创建企业分账账户回调地址
     */
    public static String NOTIFY_URL = "http://adminv2.uqbike.com/adapay/callback.do";
    /**
     * 天气api的地址
     */
    public static String WEATHER_URL = "https://api.qweather.com/v7/weather/now";
    /**
     * 使用天气的key
     */
    public static String WEATHER_KEY = "4ab55ebdae674d198b3936f3cb6c622f";
    /**
     * 运维端URL
     */
    public static String ACCOUNT_OPERA_MAIN_URL = "http://mainv2.uqbike.com";
    /**
     * Google Authenticator 密钥secretKey
     */
    public static String SUPER_PASSWORD_AUTH_SECRET = "";
    /**
     * 地址翻译key
     */
    public static String ADDRESS_TRANSLATION_KEY = "";
    /**
     * Google Authenticator 口令位数
     */
    public static String SUPER_PASSWORD_AUTH_DIGITS = "4";
    /**
     * Google Authenticator 口令有效期(单位：秒)
     */
    public static String SUPER_PASSWORD_AUTH_EXPIRE = "300";
    /**
     * 单例登录开关
     */
    public static Boolean SINGLE_LOGIN_FLAG = false;
    /**
     * token有效期
     */
    public static Integer TOKEN_EXPIRE_TIME = 60 * 60;

    /**
     * Google Authenticator 密钥secretKey
     */
    public static String SUPER_PASSWORD_AUTH_SECRET_PLUS = "";
    /**
     * Google Authenticator 口令位数
     */
    public static String SUPER_PASSWORD_AUTH_DIGITS_PLUS = "6";
    /**
     * Google Authenticator 口令有效期(单位：秒)
     */
    public static String SUPER_PASSWORD_AUTH_EXPIRE_PLUS = "300";

    /**
     * 高德地址翻译开关
     */
    public static Boolean GD_MAP_SWITCH;
    /**
     * 高德地址翻译key
     */
    public static String GD_MAP_KEY;

    /**
     * 用于监听到RefreshEvent事件后操作触发创建新实例对象
     */
    public void refresh() {
        System.out.println("刷新配置，触发创建新实例对象");
    }

    @Value("${ADMIN_OPERA_PSW:QWERTYUIOP}")
    public void initAdminOperaPsw(String operaPsw) {
        ADMIN_OPERA_PSW = operaPsw;
    }

    @Value("${GD_MAP_SWITCH}")
    public void initGdMapSwitch(Boolean s) {
        GD_MAP_SWITCH = s;
    }

    @Value("${GD_MAP_KEY}")
    public void initGdMapKey(String s) {
        GD_MAP_KEY = s;
    }

    @Value("${SUPER_PASSWORD_AUTH_SECRET_PLUS:asdfghjkl}")
    public void setSuperPasswordAuthSecretPlus(String superPasswordAuthSecretPlus) {
        SUPER_PASSWORD_AUTH_SECRET_PLUS = superPasswordAuthSecretPlus;
    }
    @Value("${SUPER_PASSWORD_AUTH_DIGITS_PLUS:6}")
    public void setSuperPasswordAuthDigitsPlus(String superPasswordAuthDigitsPlus) {
        SUPER_PASSWORD_AUTH_DIGITS_PLUS = superPasswordAuthDigitsPlus;
    }
    @Value("${SUPER_PASSWORD_AUTH_EXPIRE_PLUS:300}")
    public void setSuperPasswordAuthExpirePlus(String superPasswordAuthExpirePlus) {
        SUPER_PASSWORD_AUTH_EXPIRE_PLUS = superPasswordAuthExpirePlus;
    }

    @Value("${ACCOUNT_OPERA_DEL:ASDFGHJKL}")
    public void setAccountOperaDel(String accountOperaDel) {
        ACCOUNT_OPERA_DEL = accountOperaDel;
    }

    @Value("${USER_OPERA_UPDATE_MONEY:QWERTYUIOP}")
    public void setUserOperaUpdateMoney(String userOperaUpdateMoney) {
        USER_OPERA_UPDATE_MONEY = userOperaUpdateMoney;
    }

    @Value("${ORDER_FINISH_MANUAL:QWERTYUIOP}")
    public void setOrderFinishManual(String orderFinishManual) {
        ORDER_FINISH_MANUAL = orderFinishManual;
    }

    @Value("${DEPOSIT_OPERA_UPDATE_MONEY:ZXCVBNM}")
    public void setDepositOperaUpdateMoney(String depositOperaUpdateMoney) {
        DEPOSIT_OPERA_UPDATE_MONEY = depositOperaUpdateMoney;
    }

    @Value("${USER_OPERA_FEE_RULE:36987}")
    public void setUserOperaFeeRule(String userOperaFeeRule) {
        USER_OPERA_FEE_RULE = userOperaFeeRule;
    }

    @Value("${USER_OPERA_SYSTEMCONFIG_EDIT:74123}")
    public void setUserOperaSystemconfigEdit(String userOperaSystemconfigEdit) {
        USER_OPERA_SYSTEMCONFIG_EDIT = userOperaSystemconfigEdit;
    }

    @Value("${ACCOUNT_OPERA_DEL_MACHINE:ASDFGHJKL}")
    public void setAccountOperaDelMachine(String accountOperaDelMachine) {
        ACCOUNT_OPERA_DEL_MACHINE = accountOperaDelMachine;
    }

    @Value("${ACCOUNT_OPERA_CLIENT_URL:http://client.uqbike.cn}")
    public void setAccountOperaClientUrl(String accountOperaClientUrl) {
        ACCOUNT_OPERA_CLIENT_URL = accountOperaClientUrl;
    }

    @Value("${ACCOUNT_OPERA_PUSH_URL:http://clientv2.uqbike.com}")
    public void setAccountOperaPushUrl(String accountOperaPushUrl) {
        ACCOUNT_OPERA_PUSH_URL = accountOperaPushUrl;
    }

    @Value("${ACCOUNT_OPERA_UPDATE_CONFIG:ASDFGHJKL}")
    public void setAccountOperaUpdateConfig(String accountOperaUpdateConfig) {
        ACCOUNT_OPERA_UPDATE_CONFIG = accountOperaUpdateConfig;
    }

    @Value("${SMS_SEND_CODE_APPKEY:5f272cb18fac070fbefb93121afc4916}")
    public void setSmsSendCodeAppkey(String smsSendCodeAppkey) {
        SMS_SEND_CODE_APPKEY = smsSendCodeAppkey;
    }

    @Value("${SMS_SEND_CODE_MODELID:92020}")
    public void setSmsSendCodeModelid(String smsSendCodeModelid) {
        SMS_SEND_CODE_MODELID = smsSendCodeModelid;
    }

    @Value("${LOGIN_AUTH_PSW:3698}")
    public void setLoginAuthPsw(String loginAuthPsw) {
        LOGIN_AUTH_PSW = loginAuthPsw;
    }

    @Value("${WORKORDER_EDIT:147258}")
    public void setWorkorderEdit(String workorderEdit) {
        WORKORDER_EDIT = workorderEdit;
    }

    @Value("${BATTERY_MODEL_EDIT:753951}")
    public void setBatteryModelEdit(String batteryModelEdit) {
        BATTERY_MODEL_EDIT = batteryModelEdit;
    }

    @Value("${OTA_IP:http://otav2.tbitgps.com/prod-api}")
    public void setOtaIp(String otaIp) {
        OTA_IP = otaIp;
    }

    @Value("${OTA_KEY:E99D2A02426D47F5A0253DF5B0DD490C}")
    public void setOtaKey(String otaKey) {
        OTA_KEY = otaKey;
    }

    @Value("${OAT_SECRET:64DD75EA2868337AB3D63E8D4E6E2BAC}")
    public void setOatSecret(String oatSecret) {
        OAT_SECRET = oatSecret;
    }

    @Value("${NOTIFY_URL:http://adminv2.uqbike.com/adapay/callback.do}")
    public void setNotifyUrl(String notifyUrl) {
        NOTIFY_URL = notifyUrl;
    }

    @Value("${WEATHER_URL:https://api.qweather.com/v7/weather/now}")
    public void setWeatherUrl(String weatherUrl) {
        WEATHER_URL = weatherUrl;
    }

    @Value("${WEATHER_KEY:4ab55ebdae674d198b3936f3cb6c622f}")
    public void setWeatherKey(String weatherKey) {
        WEATHER_KEY = weatherKey;
    }

    @Value("${EXCEL_PATH:D:/UQBIKE/WbServer60002(manager_new)/download/excel}")
    public void setExcelPath(String excelPath) {
        EXCEL_PATH = excelPath;
    }

    @Value("${PATH:D:/UQBIKE/WbServer60002(manager_new)/download/}")
    public void setPATH(String PATH) {
        OperaPswConstant.PATH = PATH;
    }

    @Value("${ACCOUNT_OPERA_MAIN_URL:http://mainv2.uqbike.com}")
    public void setAccountOperaMainUrl(String accountOperaMainUrl) {
        OperaPswConstant.ACCOUNT_OPERA_MAIN_URL = accountOperaMainUrl;
    }

    @Value("${SUPER_PASSWORD_AUTH_SECRET:jnglsug72224yfeidsujfhysfkdr7vpm}")
    public void setSuperPasswordAuthSecret(String superPasswordAuthSecret) {
        SUPER_PASSWORD_AUTH_SECRET = superPasswordAuthSecret;
    }

    @Value("${ADDRESS_TRANSLATION_KEY:BZ4BZ-ZAYC2-SBPUX-CQTBU-TOXNT-UDBFD}")
    public void setAddressTranslationKey(String addressTranslationKey) {
        ADDRESS_TRANSLATION_KEY = addressTranslationKey;
    }

    @Value("${SUPER_PASSWORD_AUTH_DIGITS:4}")
    public void setSuperPasswordAuthDigits(String superPasswordAuthDigits) {
        SUPER_PASSWORD_AUTH_DIGITS = superPasswordAuthDigits;
    }

    @Value("${SUPER_PASSWORD_AUTH_EXPIRE:300}")
    public void setSuperPasswordAuthExpire(String superPasswordAuthExpire) {
        SUPER_PASSWORD_AUTH_EXPIRE = superPasswordAuthExpire;
    }

    @Value("${SINGLETON_LOGIN_FLAG}")
    public void setSingleLoginFlag(Boolean singleLoginFlag) {
        SINGLE_LOGIN_FLAG = singleLoginFlag;
    }

    @Value("${TOKEN_EXPIRE_TIME}")
    public void setTokenExpireTime(Integer tokenExpireTime) {
        TOKEN_EXPIRE_TIME = tokenExpireTime;
    }

}